<!DOCTYPE html>
2.<html>
3.<head>
4.  <style>
5.div { width:60px; height:60px; margin:5px; float:left; }
6.  </style>
7.  <script src="http://code.jquery.com/jquery-latest.js"></script>
8.</head>
9.<body>
10. 
11.<span id="result">&nbsp;</span>
12.<div style="background-color:blue;"></div>
13.<div style="background-color:rgb(15,99,30);"></div>
14. 
15.<div style="background-color:#123456;"></div>
16.<div style="background-color:#f11;"></div>
17.<script>
18.$("div").click(function () {
19.  var color = $(this).css("background-color");
20.  $("#result").html("That div is <span style='color:" +
21.                     color + ";'>" + color + "</span>.");
22.});
23. 
24.</script>
25. 
26.</body>
27.</html>
